package com.ymttest.database.sqlwapper;

import java.util.List;

import com.ymt.database.SqlManager;
import com.ymttest.database.model.YmtProductFreezeStock;
import com.ymttest.database.model.YmtProductFreezeStockLog;
import com.ymttest.database.model.YmtStockChangeDetail;

public class YmtProductFreezeStockWapper {
	SqlManager manage;

	public YmtProductFreezeStockWapper() {
		manage = new SqlManager("intpro");
	}
	
	public List<YmtProductFreezeStock> selectByProductId(String productId)throws InterruptedException{
		  @SuppressWarnings("unchecked")
		List<YmtProductFreezeStock>  ymtProductFreezeStock = manage.getSelectResults(
		            "com.ymttest.database.mapping.YmtProductFreezeStockMapper.selectByProductId", productId);
		    manage.commit();
		    return ymtProductFreezeStock;
	}
	
	public List<YmtProductFreezeStock> selectByFreezeId(String freezeId)throws InterruptedException{
		  @SuppressWarnings("unchecked")
		List<YmtProductFreezeStock>  ymtProductFreezeStock = manage.getSelectResults(
		            "com.ymttest.database.mapping.YmtProductFreezeStockMapper.selectByFreezeId", freezeId);
		    manage.commit();
		    return ymtProductFreezeStock;
	}
	
	
	public static void main(String[] args) throws InterruptedException {
		System.out.println(new YmtProductFreezeStockWapper().selectByFreezeId("DJ202133162").get(0).getCatalogId());
	}
}
